﻿@model HQPad.Models.CharacterListViewModel

@{
    ViewBag.Title = "Characters";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}

@section PageScripts {
}

<h1>Characters for <em>@Model.UserName</em></h1>

<section class="content">

    <div class="block">
        <p>Note that cloning someone else's character to your scratchpad makes a deep copy of the character.  Saving those changes will save them as a completely different character.</p>
        <table>
            <thead>
                <tr>
                    <th>Character name</th>
                    <th>Rank</th>
                    <th>Type</th>
                    <th></th>
                </tr>
            </thead>
            <tbody>
            @foreach (var character in Model.Characters)
            {
                <tr>
                    <td>@Html.Raw(character.Name)</td>
                    <td>@Html.Raw(character.Rank.ToString())</td>
                    <td>@Html.Raw(string.Format("{0}/{1}", character.Race, character.Class))</td>
                    <td>@Html.ActionLink("Clone", "CopyToScratchPad", new { slug = character.Slug, userName = Model.UserName }, new { title = "Copy to local scratch pad" })</td>
                </tr>
            }
            </tbody>
        </table>
    </div>

</section>